<ul>
	<g:each in="${root.children}" var="menuItem">
		<li>
			<g:if test="${menuItem.controller}">
				<g:link controller="${menuItem.controller}" action="${menuItem.action?menuItem.action:'index'}" title="${menuItem.tooltip.encodeAsHTML()}"><span>${menuItem.name.encodeAsHTML()}</span></g:link>
			</g:if>
			<g:else>
				<span>${menuItem.name.encodeAsHTML()}</span>
			</g:else>
		</li>
		<g:if test="${menuItem.children}">
			<g:render template="/menuTemplate" model="[root:menuItem]" />
		</g:if>
	</g:each>
</ul>

